<template>
  <div id="app">


<keep-alive>
  <!-- 会被缓存的视图组件 -->
  <router-view v-if="$route.meta.keepAlive" class="router-view"></router-view>
</keep-alive>
<!-- 不会被缓存的视图组件 -->
<router-view v-if="!$route.meta.keepAlive" class="router-view"></router-view>


  </div>
</template>

<script>
export default {
  name: "App"
};
</script>

<style>
body,
html {
  margin: 0 auto;
  padding: 0;
}
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
